home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-01-22 | 1.1 KB | 41 lines | [TEXT/ToyS] |
- on open fileDropList
- set theCount to count of fileDropList
- set filesProcessed to 0
- tell application "EPS Fixer" to activate
- repeat with i from 1 to theCount
- set theFile to item i of fileDropList as alias
- set theInfo to info for theFile
- set theType to file type of theInfo
- if theType = "TEXT" or theType = "EPSF" then
- ProcessFiles(theFile)
- set filesProcessed to filesProcessed + 1
- end if
- end repeat
- tell application "EPS Fixer" to quit
- if filesProcessed > 0 then
- if filesProcessed is equal to 1 then
- set resultString to "One file was processed."
- else
- set resultString to {theCount, " files were processed."} as string
- end if
- else
- set resultString to {"No files were processed."} as string
- end if
- display dialog resultString buttons "OK" with icon 1 default button 1
- end open
-
- on ProcessFiles(theFile)
- set theName to name of (the info for theFile)
- tell application "EPS Fixer"
- open theFile
- save document theName
- close window theName
- end tell
- end ProcessFiles
-
- on run
- set theFile to (choose file of type {"TEXT", "EPSF"}) as alias
- ProcessFiles(theFile)
- tell application "EPS Fixer" to quit
- end run
-